package org.liveboardgames.agricola.domain.card;

import java.util.Map;
import java.util.Set;

import org.liveboardgames.agricola.domain.common.AlternativeCost;
import org.liveboardgames.agricola.model.structure.Visitor;

public class ImprovementCard extends Card {

  /**
   * TODO: replicate this on client side. Major, minor, etc.
   */
  private String category;

  private Map<String, Integer> cost;

  // TODO: replicate this on client side
  private Set<AlternativeCost> alternativeCosts;

  /** ImprovementTypeEnum */
  private Set<String> types;

  public void setCategory(String category) {
    this.category = category;
  }

  public String getCategory() {
    return category;
  }

  public Map<String, Integer> getCost() {
    return cost;
  }

  public void setCost(Map<String, Integer> cost) {
    this.cost = cost;
  }

  public Set<AlternativeCost> getAlternativeCosts() {
    return alternativeCosts;
  }

  public void setAlternativeCosts(Set<AlternativeCost> alternativeCosts) {
    this.alternativeCosts = alternativeCosts;
  }

  public Set<String> getTypes() {
    return types;
  }

  public void setTypes(Set<String> types) {
    this.types = types;
  }

  @Override
  public void acceptVisit(Visitor visitor) {
    visitor.visit(this);
    
    if (alternativeCosts != null) {
      for (AlternativeCost alternativeCost : this.alternativeCosts) {
        alternativeCost.acceptVisit(visitor);
      }
    }
    
    super.acceptVisit(visitor);
  }

}
